home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen… 1994 February Supplement / ARPL-Feb-94-Supplement-PowerPC.iso / 3rd Party PowerPC Demo Apps / Aldus FreeHand / Aldus FreeHand 4.0 TV / Aldus FreeHand 4.0 TV.rsrc / Post_1145 < prev    next >
Encoding:
Text File  |  1994-01-25  |  1.2 KB  |  66 lines

  1. userdict begin /supdict 65 dict def end 
  2. supdict begin 
  3. /str1 512 string def 
  4. /dx 500 def 
  5. /dy 700 def 
  6. /cnt 0 def 
  7. /newinside { 
  8.  
  9.  
  10.  {flattenpath}fp clipper 
  11.  pathbbox
  12.  1 index 4 index sub round cvi /dx xdf
  13.  0 index 3 index sub round cvi /dy xdf
  14.  pop pop translate 
  15.  222 srand 
  16.  newpath 
  17. } bind def
  18. /randint { 
  19.  rand exch mod } def
  20. /rand8 { rand -16 bitshift 255 and} def
  21. /rand2 
  22. { rand -16 bitshift 3 and } def
  23. /brandxy {
  24.  dx randint dy randint } def
  25. /x1 
  26. { angle cos abs dx mul } def
  27. /x2 
  28. { 90 angle sub cos abs dy mul } def 
  29. /y1 
  30. { angle sin abs dx mul } def
  31. /y2 
  32. { 90 angle sub sin abs dy mul } def
  33. /backgnd 
  34. { xstart ystart m
  35. xstart ystart abs L
  36. xstart abs ystart abs L
  37. xstart abs ystart L
  38. closepath fill } def 
  39. /incrcnt 
  40. { /cnt cnt 1 add def } def
  41. /colorchoice
  42. {
  43.  /found false def  
  44.  gray? 
  45.  {/CCblack [0 0 0 0] def
  46.  color 1 exch sub
  47.  CCblack 3 3 -1 roll put
  48.  CCblack vc} 
  49.  {color length 2 eq
  50. {color 1 get type (text) type eq 
  51. {0 1 spots length 1 sub
  52. {/cnt xdf 
  53. spots cnt get 4 get color 1 get eq 
  54. {/found true def exit} if 
  55. } for
  56. found {color 1 cnt put} {color 1 3 put} ifelse
  57. } if 
  58. color vc 
  59. } if 
  60.  color length 4 eq {color vc} if   
  61.  } ifelse 
  62. } def
  63. /gray? 
  64. { color type 0 type eq color type .0 type eq or } def 
  65. end